package com.achao.basecommon.testdomain;

import com.achao.basecommon.annotation.CustomValidation;
import com.achao.basecommon.constants.MatchConstants;

import java.util.List;

/**
 * @Description：测试-实体类
 * @date：2023/8/3 15:39
 */
public class User {

    @CustomValidation(errorMessage = "用户名不可为空",fieldRemark = "用户名")
    private String name;
    @CustomValidation(value = MatchConstants.QQ_REGEX,errorMessage = "年龄不可为空",fieldRemark = "年龄")
    private Integer age;

    //@CustomValidation(errorMessage = "集合不可为空",fieldRemark = "集合")
    private List<String> list;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", list=" + list +
                '}';
    }
}
